home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 12
/
CU Amiga Magazine's Super CD-ROM 12 (1997)(EMAP Images)(GB)[!][issue 1997-07].iso
/
CUCD
/
Games
/
DestructivePoker
/
sources
/
sources.lha
/
game.h
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-18
|
2KB
|
105 lines
/*
Game.h
V1.00 - 121196 Kimmo Teräväinen
----- ------ ----------------
V0.01 121196 Ehdotus Win & AmigaOS versioiden yhdistämiseksi
V0.10 291196 Luo pakat jakaa kortit, kutsuu preferences-
dialogeja.
V0.12 130297 Added Prefs setting to constructor
*/
#ifndef DC1_POKER_GAME
#define DC1_POKER_GAME
#include "card.h"
#include "dealpile.h"
#include "junkpile.h"
#include "handpile.h"
#include "filerequ.h"
#ifdef _Windows
#include "owl/intlabel.h"
#else
#include "intlabel.h"
#endif
const int MAX_CHANGES = 3;
class cGamePoker {
TWindow *wnd; // Window where we are
const TBitmap *gfx; // graphics
cDealPile dealpile;
cJunkPile junkpile;
cHandPile handpile;
int jokers,changes,
changed;
cIMGCard *cards[CARDS_MAX_LKM]; // pointer array of cards
TIntLabel money;
cFileReq req;
protected:
void CreateCards();
void DeleteCards();
public:
cGamePoker(TWindow *Wnd,const TBitmap *Gfx,int pjoker=FALSE,int p5kind=FALSE,int cha=1,int jok=3) :
dealpile(CARDS_MAX_LKM,20,50),
junkpile(CARDS_MAX_LKM,500,50),
handpile(100,100,pjoker,p5kind),
wnd(Wnd),
gfx(Gfx),
req(wnd),
changes(cha),
jokers(jok),
#ifdef _Windows
money(Wnd,STATIC_MONEY,8,0)
#else
money(Wnd,0,200+Wnd->BorderLeft,15+Wnd->BorderTop,100,12)
#endif
{
money=0;
changed=-1;
CreateCards();
InitPiles();
}
virtual ~cGamePoker() { DeleteCards(); }
cIMGCard *const *Cards() const { return cards; }
const TBitmap *Gfx() const { return gfx; }
int Money_Add(int val) { return money+=val; }
int Jokers() const { return jokers; }
int Changes() const { return changes; }
int SetJokers(int j) { return jokers=j; }
int SetChanges(int c) { return changes=c; }
int PrefsJoker() const { return handpile.GetPrefs_5jokers(); }
int Prefs5Kind() const { return handpile.GetPrefs_5ofkind(); }
void InitPiles();
void MenuNew();
void MenuOld(); // MenuOpen
void MenuSave();
void MenuAbout();
void MenuQuit() {}
void MenuCopy() {}
void MenuPrefsHand();
void MenuPrefsBet();
void MenuHelp();
void GadgetShuffle();
void GadgetFinish();
void GadgetBet(); // { MenuPrefsBet(); }
void GadgetChanges() {}
void GadgetJokers() {}
void GadgetTurn(int card) {
handpile.Turn(card);
}
};
#endif